BEGIN TRY
    BEGIN TRANSACTION;
    -- 业务逻辑
    COMMIT TRANSACTION;
END TRY
BEGIN CATCH
    IF XACT_STATE() = -1
        ROLLBACK TRANSACTION;  -- 强制回滚‌:ml-citation{ref="4,6" data="citationList"}
    DECLARE @ErrorMsg NVARCHAR(4000) = ERROR_MESSAGE();
    RAISERROR(@ErrorMsg, 16, 1);
END CATCH;
